﻿/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/

CKEDITOR.editorConfig = function( config )
{
	// Define changes to default configuration here. For example:
	config.language = 'vi';
	config.uiColor = '#AADC6E';
	config.skin = 'kama';
	config.height = 500;
	config.toolbar = 'HTToolbar';
	config.toolbar_HTToolbar =
	[
		{ name: 'mytools1', items : [ 'NewPage','-', 'Bold','Italic','Underline','Strike','-','RemoveFormat'] },
		{ name: 'mytools2', items : [ 'JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock' ] },
		{ name: 'mytools3', items : [ 'Font','FontSize','TextColor','BGColor' ] },
		{ name: 'mytools5', items : [ 'Link','Image','Flash', ] }
	];
	config.toolbar_MyToolbar =
	[
		{ name: 'document', items : [ 'Source','-','Save','NewPage','DocProps','Preview','Print','-','Templates' ] },
		{ name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
		{ name: 'editing', items : [ 'Find','Replace','-','SelectAll' ] },
		{ name: 'tools', items : [ 'Maximize', 'ShowBlocks' ] },
		'/',
		{ name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] },
		{ name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl' ] },
		{ name: 'links', items : [ 'Link','Unlink','Anchor' ] },
		'/',
		{ name: 'styles', items : [ 'Styles','Format','Font','FontSize' ] },
		{ name: 'colors', items : [ 'TextColor','BGColor' ] },
		{ name: 'insert', items : [ 'Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe' ] }
	];
	config.toolbar_Full =
	[
		{ name: 'document', items : [ 'Source','-','Save','NewPage','DocProps','Preview','Print','-','Templates' ] },
		{ name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
		{ name: 'editing', items : [ 'Find','Replace','-','SelectAll','-','SpellChecker', 'Scayt' ] },
		{ name: 'forms', items : [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField' ] },
		'/',
		{ name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] },
		{ name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl' ] },
		{ name: 'links', items : [ 'Link','Unlink','Anchor' ] },
		{ name: 'insert', items : [ 'Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe' ] },
		'/',
		{ name: 'styles', items : [ 'Styles','Format','Font','FontSize' ] },
		{ name: 'colors', items : [ 'TextColor','BGColor' ] },
		{ name: 'tools', items : [ 'Maximize', 'ShowBlocks','-','About' ] }
	];
	
	// Cấu hình tích hợp CKFinder vào CKEditor
	var path = "/trangtin_v0.7/scripts/ckfinder/";
	
	config.filebrowserBrowseUrl 		= path + 'ckfinder.html';
	config.filebrowserImageBrowseUrl 	= path + 'ckfinder.html?type=Images';
	config.filebrowserFlashBrowseUrl 	= path + 'ckfinder.html?type=Flash';
	config.filebrowserUploadUrl 		= path + 'core/connector/php/connector.php?command=QuickUpload&type=Files';
	config.filebrowserImageUploadUrl 	= path + 'core/connector/php/connector.php?command=QuickUpload&type=Images';
	config.filebrowserFlashUploadUrl 	= path + 'core/connector/php/connector.php?command=QuickUpload&type=Flash';
};